package com.taxi.driver.module.recruit.selectcolor;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.taxi.driver.R;
import com.taxi.driver.common.BaseActivity;
import com.taxi.driver.module.recruit.CarInfoEntryActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 选择颜色
 * Created by Curry on 2018/5/16.
 */

public class SelectColorActivity extends BaseActivity
{
        @BindView(R.id.ll_hei)
    LinearLayout  ll_hei;
    @BindView(R.id.ll_bai)
    LinearLayout  ll_bai;
    @BindView(R.id.ll_hui)
    LinearLayout  ll_hui;
    @BindView(R.id.ll_yin)
LinearLayout  ll_yin;
    @BindView(R.id.ll_hong)
    LinearLayout  ll_hong;
    @BindView(R.id.ll_lan)
    LinearLayout  ll_lan;
    @BindView(R.id.ll_zong)
LinearLayout  ll_zong;
    @BindView(R.id.ll_zi)
LinearLayout  ll_zi;
    @BindView(R.id.ll_jin)
LinearLayout  ll_jin;
    @BindView(R.id.ll_lv)
LinearLayout  ll_lv;
    @BindView(R.id.ll_qing)
LinearLayout  ll_qing;
    @BindView(R.id.ll_fen)
    LinearLayout  ll_fen;
    @BindView(R.id.ll_huang)
    LinearLayout  ll_huang;
    public static void startIntent(Context context) {
        Intent intent = new Intent(context, SelectColorActivity.class);
//        intent.putExtra(KEY_ADDRESS_TYPE, type);
//        intent.putExtra(KEY_CAR_TYPE, carType);
        context.startActivity(intent);
    }
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.select_color_activity);
        ButterKnife.bind(this);

    }
    @OnClick({R.id.ll_hei,R.id.ll_bai,R.id.ll_hui,R.id.ll_yin,R.id.ll_hong,R.id.ll_lan,R.id.ll_zong,R.id.ll_zi,R.id.ll_jin,R.id.ll_lv,R.id.ll_qing,R.id.ll_fen,R.id.ll_huang})
    public void onClick(View v){
        String color;

        switch (v.getId()){

            case R.id.ll_hei:
                color="黑色";                 setColor(color);
                break;
            case R.id.ll_bai:
                color="白色";                 setColor(color);
                break;
            case R.id.ll_hui:
                color="灰色";                setColor(color);
                break;
            case R.id.ll_yin:
                color="银色";                setColor(color);
                break;
            case R.id.ll_hong:
                color="红色";                setColor(color);
                break;
            case R.id.ll_zong:
                color="棕色";                setColor(color);
                break;
            case R.id.ll_lan:
                color="蓝色";                setColor(color);
                break;
            case R.id.ll_zi:
                color="紫色";                setColor(color);
                break;
            case R.id.ll_jin:
                color="金色";                setColor(color);
                break;
            case R.id.ll_lv:
                color="绿色";                setColor(color);
                break;
            case R.id.ll_qing:
                color="青色";                setColor(color);
                break;
            case R.id.ll_huang:
                color="黄色";                setColor(color);
                break;
            case R.id.ll_fen:
                color="粉色";                 setColor(color);
                break;
        }
    }

    public void setColor(String color){

        CarInfoEntryActivity.startIntent2(this,color);
        this.finish();
    }

}
